package com.example.second.state.classes;

import android.util.Log;

import com.example.second.state.interfaces.ILEDState;

/**
 * @ClassName: LEDOn$
 * @Description: 灯开状态，处理ledOff动作
 * @Author: xinya
 * @CreateDate: 2020/12/21$ 14:06$
 * @UpdateRemark: 更新内容
 * @Version: 1.0
 */
public class LedOnState implements ILEDState {
    private static final String TAG = "LEDOn";
    private RoomLed mRoomLed;

    public LedOnState(RoomLed roomLed) {
        mRoomLed = roomLed;
    }

    @Override
    public void ledOn() {
        Log.e(TAG, "ledOn: 灯已经打开，无需再次打开！");
    }

    @Override
    public void ledOff() {
        Log.d(TAG, "ledOff: 关闭成功");
        mRoomLed.setState(mRoomLed.getLedOffState());
    }
}
